package com.itlong.cloud.project.operate;

import com.itlong.cloud.POJO.DTO.operate.OperateAdInfoGetPageDTO;
import com.itlong.cloud.POJO.DTO.operate.OperateSaveAdInfoDTO;
import com.itlong.cloud.POJO.DTO.operate.OperateUpdateAdInfoDTO;
import com.itlong.cloud.POJO.VO.operate.OperateAdGetOneVO;
import com.itlong.cloud.POJO.VO.operate.OperateAdImgVO;
import com.itlong.cloud.POJO.VO.operate.OperateAdVO;
import com.itlong.cloud.utils.page.Page;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * <desc>
 *      运营-运营管理-广告管理接口暴露。
 * <desc/>
 *
 * @createDate 2017/10/10.
 */
@FeignClient(name = "project-service")
public interface IOperateAdManageServiceClient {

     /**
      * <desc>
      *      保存广告信息。
      * <desc/>
      *
      * @param  adInfoDTO 广告信息对象
      * @return
      * @author shengen.T
      * @createDate 2017/10/16
      */
    @RequestMapping(path = "/operate/marketer/ad/saveAd", method = {RequestMethod.POST})
    Integer saveAd(@RequestBody OperateSaveAdInfoDTO adInfoDTO) throws Exception;

    /**
     * <desc>
     *      修改广告信息。
     * <desc/>
     *
     * @param  adInfoDTO 广告信息对象
     * @return
     * @author shengen.T
     * @createDate 2017/10/16
     */
    @RequestMapping(path = "/operate/marketer/ad/updateAd", method = {RequestMethod.POST})
    Integer updateAd(@RequestBody OperateUpdateAdInfoDTO adInfoDTO) throws Exception;

     /**
      * <desc>
      *      批量发布广告信息。
      * <desc/>
      *
      * @param  adIds 广告ID列表
      * @return
      * @author shengen.T
      * @createDate 2017/10/17
      */
    @RequestMapping(path = "/operate/marketer/ad/publishAd/{adIds}",method = {RequestMethod.GET})
    Integer publishAd(@RequestParam(name = "adIds") String adIds) throws Exception;

    /**
     * <desc>
     *      批量删除广告信息。
     * <desc/>
     *
     * @param  adIds 广告ID列表
     * @return
     * @author shengen.T
     * @createDate 2017/10/17
     */
    @RequestMapping(path = "/operate/marketer/ad/deleteAd/{adIds}",method = {RequestMethod.GET})
    Integer deleteAd(@RequestParam(name = "adIds") String adIds) throws Exception;

     /**
      * <desc>
      *      设置广告状态。
      * <desc/>
      *
      * @param  adId 广告ID
      * @param  status 状态
      * @return
      * @author shengen.T
      * @createDate 2017/10/17
      */
    @RequestMapping(path = "/operate/marketer/ad/setAdStatus/{adId}/{status}",method = {RequestMethod.GET})
    Integer setAdStatus(@RequestParam(name = "adId") String adId, @RequestParam(name = "status") Integer status) throws Exception;


     /**
      * <desc>
      *      获取单条广告信息。
      * <desc/>
      *
      * @param  adId 广告ID
      * @return
      * @author shengen.T
      * @createDate 2017/10/17
      */
    @RequestMapping(path = "/operate/marketer/ad/getAdInfo/{adId}",method = {RequestMethod.GET})
    OperateAdGetOneVO getAdInfo(@RequestParam(name = "adId") String adId) throws Exception;

     /**
      * <desc>
      *      条件查询广告信息列表。
      * <desc/>
      *
      * @param pageDTO
      * @return
      * @author shengen.T
      * @createDate 2017/10/17
      */
    @RequestMapping(path="/operate/marketer/ad/getAdInfoPage",method = {RequestMethod.POST})
    Page<OperateAdVO> getAdInfoPage(@RequestBody OperateAdInfoGetPageDTO pageDTO) throws Exception;

    /**
     * <desc>
     *      获取最新已发布Banner图片列表
     * <desc/>
     *
     * @param projectId 项目id
     * @param type 广告类型（1主页，2服务页，3物业服务页）
     * @param publishPlatform 发布平台（1APP，2小程序）
     * @return
     * @author Chunjian.G
     * @createDate 2017-11-08
     */
    @RequestMapping(path="/operate/marketer/ad/getBannerImgs",method = {RequestMethod.POST})
    List<OperateAdImgVO> getBannerImgs(@RequestParam(name = "projectId") String projectId,
                                       @RequestParam(name = "type") Integer type,
                                       @RequestParam(name = "publishPlatform") Integer publishPlatform) throws Exception;
    
     /**
      * <desc>
      *      改变过期的广告的发布状态。
      * <desc/>
      *
      * @param
      * @return 
      * @author shengen.T
      * @createDate 2017/11/24
      */
    @RequestMapping(path="/operate/marketer/ad/changePublishState")
    boolean changePublishStateTimeTask() throws Exception;

    /**
     * <desc>
     *      广告审核通过
     * </desc>
     *
     * @param operateAdInfoGetPageDTO 参数DTO
     * @return
     * @Author Zhu.yj
     * @createDate  2020/12/24
     */
    @PostMapping("/operate/marketer/ad/audit")
    Integer audit(@RequestBody OperateAdInfoGetPageDTO operateAdInfoGetPageDTO) throws Exception;
}
